3.1.33 \(\int \frac {3-2 \sqrt {3}+(-3+\sqrt {3}) x^4}{1-x^4+x^8} \, dx\) [33]

Optimal. Leaf size=180 \[ \frac {1}{2} \sqrt {3 \left (2-\sqrt {3}\right )} \tan ^{-1}\left (\frac {\sqrt {2+\sqrt {3}}-2 x}{\sqrt {2-\sqrt {3}}}\right )-\frac {1}{2} \sqrt {3 \left (2-\sqrt {3}\right )} \tan ^{-1}\left (\frac {\sqrt {2+\sqrt {3}}+2 x}{\sqrt {2-\sqrt {3}}}\right )+\frac {1}{4} \sqrt {3 \left (2-\sqrt {3}\right )} \log \left (1-\sqrt {2-\sqrt {3}} x+x^2\right )-\frac {1}{4} \sqrt {3 \left (2-\sqrt {3}\right )} \log \left (1+\sqrt {2-\sqrt {3}} x+x^2\right ) \]

[Out]

1/2*arctan((-2*x+1/2*6^(1/2)+1/2*2^(1/2))/(1/2*6^(1/2)-1/2*2^(1/2)))*(3/2*2^(1/2)-1/2*6^(1/2))-1/2*arctan((2*x
+1/2*6^(1/2)+1/2*2^(1/2))/(1/2*6^(1/2)-1/2*2^(1/2)))*(3/2*2^(1/2)-1/2*6^(1/2))+1/4*ln(1+x^2-x*(1/2*6^(1/2)-1/2
*2^(1/2)))*(3/2*2^(1/2)-1/2*6^(1/2))-1/4*ln(1+x^2+x*(1/2*6^(1/2)-1/2*2^(1/2)))*(3/2*2^(1/2)-1/2*6^(1/2))

________________________________________________________________________________________

Rubi [A]
time = 0.09, antiderivative size = 180, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 6, integrand size = 33, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {1437, 1175, 632, 210, 1178, 642} \begin {gather*} \frac {1}{2} \sqrt {3 \left (2-\sqrt {3}\right )} \text {ArcTan}\left (\frac {\sqrt {2+\sqrt {3}}-2 x}{\sqrt {2-\sqrt {3}}}\right )-\frac {1}{2} \sqrt {3 \left (2-\sqrt {3}\right )} \text {ArcTan}\left (\frac {2 x+\sqrt {2+\sqrt {3}}}{\sqrt {2-\sqrt {3}}}\right )+\frac {1}{4} \sqrt {3 \left (2-\sqrt {3}\right )} \log \left (x^2-\sqrt {2-\sqrt {3}} x+1\right )-\frac {1}{4} \sqrt {3 \left (2-\sqrt {3}\right )} \log \left (x^2+\sqrt {2-\sqrt {3}} x+1\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(3 - 2*Sqrt[3] + (-3 + Sqrt[3])*x^4)/(1 - x^4 + x^8),x]

[Out]

(Sqrt[3*(2 - Sqrt[3])]*ArcTan[(Sqrt[2 + Sqrt[3]] - 2*x)/Sqrt[2 - Sqrt[3]]])/2 - (Sqrt[3*(2 - Sqrt[3])]*ArcTan[
(Sqrt[2 + Sqrt[3]] + 2*x)/Sqrt[2 - Sqrt[3]]])/2 + (Sqrt[3*(2 - Sqrt[3])]*Log[1 - Sqrt[2 - Sqrt[3]]*x + x^2])/4
 - (Sqrt[3*(2 - Sqrt[3])]*Log[1 + Sqrt[2 - Sqrt[3]]*x + x^2])/4

Rule 210

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[-b, 2])^(-1))*ArcTan[Rt[-b, 2]*(x/Rt[-a, 2])
], x] /; FreeQ[{a, b}, x] && PosQ[a/b] && (LtQ[a, 0] || LtQ[b, 0])

Rule 632

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 642

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[d*(Log[RemoveContent[a + b*x +
c*x^2, x]]/b), x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rule 1175

Int[((d_) + (e_.)*(x_)^2)/((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4), x_Symbol] :> With[{q = Rt[2*(d/e) - b/c, 2]},
Dist[e/(2*c), Int[1/Simp[d/e + q*x + x^2, x], x], x] + Dist[e/(2*c), Int[1/Simp[d/e - q*x + x^2, x], x], x]] /
; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && EqQ[c*d^2 - a*e^2, 0] && (GtQ[2*(d/e) - b/c, 0] || ( !Lt
Q[2*(d/e) - b/c, 0] && EqQ[d - e*Rt[a/c, 2], 0]))

Rule 1178

Int[((d_) + (e_.)*(x_)^2)/((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4), x_Symbol] :> With[{q = Rt[-2*(d/e) - b/c, 2]},
 Dist[e/(2*c*q), Int[(q - 2*x)/Simp[d/e + q*x - x^2, x], x], x] + Dist[e/(2*c*q), Int[(q + 2*x)/Simp[d/e - q*x
 - x^2, x], x], x]] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && EqQ[c*d^2 - a*e^2, 0] &&  !GtQ[b^2
- 4*a*c, 0]

Rule 1437

Int[((d_) + (e_.)*(x_)^(n_))/((a_) + (b_.)*(x_)^(n_) + (c_.)*(x_)^(n2_)), x_Symbol] :> With[{q = Rt[a/c, 2]},
With[{r = Rt[2*q - b/c, 2]}, Dist[1/(2*c*q*r), Int[(d*r - (d - e*q)*x^(n/2))/(q - r*x^(n/2) + x^n), x], x] + D
ist[1/(2*c*q*r), Int[(d*r + (d - e*q)*x^(n/2))/(q + r*x^(n/2) + x^n), x], x]]] /; FreeQ[{a, b, c, d, e}, x] &&
 EqQ[n2, 2*n] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && IGtQ[n/2, 0] && NegQ[b^2 - 4*a*c]

Rubi steps

\begin {align*} \int \frac {3-2 \sqrt {3}+\left (-3+\sqrt {3}\right ) x^4}{1-x^4+x^8} \, dx &=\frac {\int \frac {\sqrt {3} \left (3-2 \sqrt {3}\right )+\left (-6+3 \sqrt {3}\right ) x^2}{1-\sqrt {3} x^2+x^4} \, dx}{2 \sqrt {3}}+\frac {\int \frac {\sqrt {3} \left (3-2 \sqrt {3}\right )+\left (6-3 \sqrt {3}\right ) x^2}{1+\sqrt {3} x^2+x^4} \, dx}{2 \sqrt {3}}\\ &=\frac {1}{4} \sqrt {3 \left (2-\sqrt {3}\right )} \int \frac {\sqrt {2-\sqrt {3}}+2 x}{-1-\sqrt {2-\sqrt {3}} x-x^2} \, dx+\frac {1}{4} \sqrt {3 \left (2-\sqrt {3}\right )} \int \frac {\sqrt {2-\sqrt {3}}-2 x}{-1+\sqrt {2-\sqrt {3}} x-x^2} \, dx-\frac {1}{4} \left (-3+2 \sqrt {3}\right ) \int \frac {1}{1-\sqrt {2+\sqrt {3}} x+x^2} \, dx-\frac {1}{4} \left (-3+2 \sqrt {3}\right ) \int \frac {1}{1+\sqrt {2+\sqrt {3}} x+x^2} \, dx\\ &=\frac {1}{4} \sqrt {3 \left (2-\sqrt {3}\right )} \log \left (1-\sqrt {2-\sqrt {3}} x+x^2\right )-\frac {1}{4} \sqrt {3 \left (2-\sqrt {3}\right )} \log \left (1+\sqrt {2-\sqrt {3}} x+x^2\right )-\frac {1}{2} \left (3-2 \sqrt {3}\right ) \text {Subst}\left (\int \frac {1}{-2+\sqrt {3}-x^2} \, dx,x,-\sqrt {2+\sqrt {3}}+2 x\right )-\frac {1}{2} \left (3-2 \sqrt {3}\right ) \text {Subst}\left (\int \frac {1}{-2+\sqrt {3}-x^2} \, dx,x,\sqrt {2+\sqrt {3}}+2 x\right )\\ &=\frac {1}{2} \sqrt {6-3 \sqrt {3}} \tan ^{-1}\left (\frac {\sqrt {2+\sqrt {3}}-2 x}{\sqrt {2-\sqrt {3}}}\right )-\frac {1}{2} \sqrt {6-3 \sqrt {3}} \tan ^{-1}\left (\frac {\sqrt {2+\sqrt {3}}+2 x}{\sqrt {2-\sqrt {3}}}\right )+\frac {1}{4} \sqrt {3 \left (2-\sqrt {3}\right )} \log \left (1-\sqrt {2-\sqrt {3}} x+x^2\right )-\frac {1}{4} \sqrt {3 \left (2-\sqrt {3}\right )} \log \left (1+\sqrt {2-\sqrt {3}} x+x^2\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [C] Result contains higher order function than in optimal. Order 9 vs. order 3 in optimal.
time = 0.03, size = 89, normalized size = 0.49 \begin {gather*} \frac {1}{4} \text {RootSum}\left [1-\text {$\#$1}^4+\text {$\#$1}^8\&,\frac {3 \log (x-\text {$\#$1})-2 \sqrt {3} \log (x-\text {$\#$1})-3 \log (x-\text {$\#$1}) \text {$\#$1}^4+\sqrt {3} \log (x-\text {$\#$1}) \text {$\#$1}^4}{-\text {$\#$1}^3+2 \text {$\#$1}^7}\&\right ] \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(3 - 2*Sqrt[3] + (-3 + Sqrt[3])*x^4)/(1 - x^4 + x^8),x]

[Out]

RootSum[1 - #1^4 + #1^8 & , (3*Log[x - #1] - 2*Sqrt[3]*Log[x - #1] - 3*Log[x - #1]*#1^4 + Sqrt[3]*Log[x - #1]*
#1^4)/(-#1^3 + 2*#1^7) & ]/4

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 3.
time = 0.09, size = 62, normalized size = 0.34

method result size
default \(\frac {\left (\munderset {\textit {\_R} =\RootOf \left (\textit {\_Z}^{8}-\textit {\_Z}^{4}+1\right )}{\sum }\frac {\left (-6 \textit {\_R}^{4}+2 \sqrt {3}\, \textit {\_R}^{4}+\left (-3+\sqrt {3}\right ) \left (\sqrt {3}-1\right )\right ) \ln \left (x -\textit {\_R} \right )}{2 \textit {\_R}^{7}-\textit {\_R}^{3}}\right )}{8}\) \(62\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((3+x^4*(-3+3^(1/2))-2*3^(1/2))/(x^8-x^4+1),x,method=_RETURNVERBOSE)

[Out]

1/8*sum(1/(2*_R^7-_R^3)*(-6*_R^4+2*3^(1/2)*_R^4+(-3+3^(1/2))*(3^(1/2)-1))*ln(x-_R),_R=RootOf(_Z^8-_Z^4+1))

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((3+x^4*(-3+3^(1/2))-2*3^(1/2))/(x^8-x^4+1),x, algorithm="maxima")

[Out]

integrate((x^4*(sqrt(3) - 3) - 2*sqrt(3) + 3)/(x^8 - x^4 + 1), x)

________________________________________________________________________________________

Fricas [A]
time = 0.37, size = 181, normalized size = 1.01 \begin {gather*} -\frac {1}{2} \, \sqrt {-3 \, \sqrt {3} + 6} \arctan \left (\frac {1}{3} \, {\left (3 \, x^{3} + \sqrt {3} {\left (2 \, x^{3} - x\right )} - 3 \, x\right )} \sqrt {-3 \, \sqrt {3} + 6}\right ) - \frac {1}{2} \, \sqrt {-3 \, \sqrt {3} + 6} \arctan \left (\frac {1}{3} \, {\left (2 \, \sqrt {3} x + 3 \, x\right )} \sqrt {-3 \, \sqrt {3} + 6}\right ) + \frac {1}{4} \, \sqrt {-3 \, \sqrt {3} + 6} \log \left (\frac {3 \, x^{8} + 12 \, x^{6} + 15 \, x^{4} + 12 \, x^{2} - 6 \, \sqrt {3} {\left (x^{6} + 2 \, x^{4} + x^{2}\right )} + 2 \, {\left (3 \, x^{5} + 3 \, x^{3} - \sqrt {3} {\left (x^{7} + x^{5} + x^{3} + x\right )}\right )} \sqrt {-3 \, \sqrt {3} + 6} + 3}{x^{8} - x^{4} + 1}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((3+x^4*(-3+3^(1/2))-2*3^(1/2))/(x^8-x^4+1),x, algorithm="fricas")

[Out]

-1/2*sqrt(-3*sqrt(3) + 6)*arctan(1/3*(3*x^3 + sqrt(3)*(2*x^3 - x) - 3*x)*sqrt(-3*sqrt(3) + 6)) - 1/2*sqrt(-3*s
qrt(3) + 6)*arctan(1/3*(2*sqrt(3)*x + 3*x)*sqrt(-3*sqrt(3) + 6)) + 1/4*sqrt(-3*sqrt(3) + 6)*log((3*x^8 + 12*x^
6 + 15*x^4 + 12*x^2 - 6*sqrt(3)*(x^6 + 2*x^4 + x^2) + 2*(3*x^5 + 3*x^3 - sqrt(3)*(x^7 + x^5 + x^3 + x))*sqrt(-
3*sqrt(3) + 6) + 3)/(x^8 - x^4 + 1))

________________________________________________________________________________________

Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: PolynomialError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((3+x**4*(-3+3**(1/2))-2*3**(1/2))/(x**8-x**4+1),x)

[Out]

Exception raised: PolynomialError >> 1/(-36944369544063775196667969536*_t**32 + 21329841701306232282053345280*
sqrt(3)*_t**32 - 167111083173036783803087978496*sqrt(3)*_t**28 + 289444886563568182740740210688*_t**28 - 99211
39603646460044679

________________________________________________________________________________________

Giac [A]
time = 3.95, size = 131, normalized size = 0.73 \begin {gather*} \frac {1}{4} \, {\left (\sqrt {6} - 3 \, \sqrt {2}\right )} \arctan \left (\frac {4 \, x + \sqrt {6} + \sqrt {2}}{\sqrt {6} - \sqrt {2}}\right ) + \frac {1}{4} \, {\left (\sqrt {6} - 3 \, \sqrt {2}\right )} \arctan \left (\frac {4 \, x - \sqrt {6} - \sqrt {2}}{\sqrt {6} - \sqrt {2}}\right ) + \frac {1}{8} \, {\left (\sqrt {6} - 3 \, \sqrt {2}\right )} \log \left (x^{2} + \frac {1}{2} \, x {\left (\sqrt {6} - \sqrt {2}\right )} + 1\right ) - \frac {1}{8} \, {\left (\sqrt {6} - 3 \, \sqrt {2}\right )} \log \left (x^{2} - \frac {1}{2} \, x {\left (\sqrt {6} - \sqrt {2}\right )} + 1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((3+x^4*(-3+3^(1/2))-2*3^(1/2))/(x^8-x^4+1),x, algorithm="giac")

[Out]

1/4*(sqrt(6) - 3*sqrt(2))*arctan((4*x + sqrt(6) + sqrt(2))/(sqrt(6) - sqrt(2))) + 1/4*(sqrt(6) - 3*sqrt(2))*ar
ctan((4*x - sqrt(6) - sqrt(2))/(sqrt(6) - sqrt(2))) + 1/8*(sqrt(6) - 3*sqrt(2))*log(x^2 + 1/2*x*(sqrt(6) - sqr
t(2)) + 1) - 1/8*(sqrt(6) - 3*sqrt(2))*log(x^2 - 1/2*x*(sqrt(6) - sqrt(2)) + 1)

________________________________________________________________________________________

Mupad [B]
time = 2.23, size = 1, normalized size = 0.01 \begin {gather*} 0 \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x^4*(3^(1/2) - 3) - 2*3^(1/2) + 3)/(x^8 - x^4 + 1),x)

[Out]

0

________________________________________________________________________________________